package day9.Exer;

public abstract class Car {
    private String brand, carNo;
    private int rental;
    private boolean rent;  //用真和假表示车是否租出

    public Car() {
    }

    public Car(String brand, String carNo, int rental, boolean rent) {
        this.brand = brand;
        this.carNo = carNo;
        this.rental = rental;
        this.rent = rent;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getCarNo() {
        return carNo;
    }

    public void setCarNo(String carNo) {
        this.carNo = carNo;
    }

    public int getRental() {
        return rental;
    }

    public void setRental(int rental) {
        this.rental = rental;
    }

    public boolean isRent() {
        return rent;
    }

    public void setRent(boolean rent) {
        this.rent = rent;
    }
    public String tostring(boolean rent){
        if(isRent()==true){
            return "当前可租";
        }
        return "已租出";
    }
    //    public String setRent(boolean rent) {
//        if(rent=false){
//            return "已租出";
//        }else {
//            return "当前可租";
//        }
//        //this.rent = rent;
//    }


    public abstract void showinfo();

    public abstract void showforleasing();

    public abstract double calRent(int day);
}
